#!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2023/2/15 20:31
# @Author : caoshi
# @Version：V1.0
# @File : 05-格式化输出.py
# @desc :

# info = 'my name is %s, I am from %s.' % ('张大仙', '武汉')
# print(info) my name is 张大仙, I am from 武汉.

# info = 'my name is %(name)s, I am from %(area)s.' % {"area": "黄冈", "name": "李四"}
# print(info) my name is 李四, I am from 黄冈.


# 2. format()
# info = 'my name is {}, I am from {}.'.format('zs', 'wuhan')
# print(info)

# info = 'my name is {0}{0}, I am from {1}.'.format('zs', 'wuhan')
# print(info)

# info = 'my name is {name}--{name}, I am from {area}.'.format(name='zs', area='wuhan')
# print(info)

# 格式化填充
# a = '{0:*^20}'.format('开始')
# print(a)  *********开始*********

# b = '{num:.2f}'.format(num=3.1415926)
# print(b)    3.14

# 3. f
name = input('请输入您的名字: ')
hometown = input('请输入您的家乡: ')
info = f'我的名字是{name}, 我来自{hometown}'
print(info)
